//
//  SDHomeViewController.m
//  SuperDoctor
//
//  Created by 李忠 on 7/5/16.
//  Copyright © 2016 SD. All rights reserved.
//

#import "SDHomeViewController.h"
#import "SDWeatherView.h"
#import "SDNetWorkTool.h"

@interface SDHomeViewController ()

//显示天气的view
@property (nonatomic, strong) SDWeatherView *weatherView;
//获取天气数组
@property (nonatomic, strong) NSArray *weathers;

@end

@implementation SDHomeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self setupUI];
    [self setupLayout];
}

- (void)setupUI {
    
    self.view.backgroundColor = [UIColor whiteColor];
    self.navigationController.navigationBar.barTintColor = kThemeColor;
    self.title = @"马医一生";
    
    

}
- (void)setupLayout{
    [self.weaterView mas_makeConstraints:^(MASConstraintMaker *make) {

        make.top.mas_equalTo(self.mas_topLayoutGuideBottom).mas_offset(0);
        make.leading.trailing.mas_equalTo(0);
        make.height.mas_equalTo(80);
        
    }];
}

- (SDWeatherView *)weaterView{
    if (_weatherView == nil) {
        _weatherView = [[SDWeatherView alloc] init];
        _weatherView.backgroundColor = [UIColor colorWithRed:170.0/255 green:239.0/255 blue:219.0/255 alpha:1.0];
        [self.view addSubview:_weatherView];
    }
    return _weatherView;
}


@end
